﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Administration_Users_Default : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {
        if (!string.IsNullOrEmpty(Request.QueryString["DeleteUserName"])) {
            string userName = Request.QueryString["DeleteUserName"];
            if (userName.Equals(User.Identity.Name, StringComparison.OrdinalIgnoreCase) || userName.Equals("administrator", StringComparison.OrdinalIgnoreCase)) return;
            Membership.DeleteUser(userName);
            Response.Redirect("Default.aspx");
        }
    }
}
